<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core">
<body>
	<ui:composition template="/template.xhtml">
		<ui:define name="title">
                Printer Bean (Singleton, Concurrent access)
            </ui:define>
		<ui:define name="body">
			<h:form id="addWindowForm" class="form form-inlined">
				<h:commandButton action="${printerBean.print()}" value="Print" class="btn btn-primary btn-large" onclick="document.getElementById('status').firstChild.data = 'Printing...';" />
			</h:form>
			<div class="row">
				<div class="span4">
					<h:outputLabel value="Total calls number: #{printerBean.calloutNumber}" />
				</div>
			</div>			
			<div class="row">
				<div class="span4">
					<h:outputLabel id="status" value="${printerBean.lastPrintingStatus}" />
				</div>
			</div>
		</ui:define>
	</ui:composition>
</body>
</html>
